home *** CD-ROM | disk | FTP | other *** search
- .file "m68kcall.s"
- .extern _PowerPCBase
-
- .text
-
- .align 3
- .globl _m68k
- _m68k:
- # r3 pointer to M68k function
- # 28(r1) ... M68k arguments on stack
- # -> r3 return code of M68k function
- mflr r0
- stw r0,8(r1)
- stwu r1,-32(r1)
- stw r31,24(r1)
- lwz r31,@_ppcargs(r2)
- stw r3,0(r31) # PP_Code
- la r4,32+28-24(r1)
- stw r4,12(r31) # PP_Stack-24
- lwz r3,32(r1)
- mr r4,r31
- sub r3,r3,r1
- subi r3,r3,32+28
- stw r3,16(r4) # PP_StackSize = FrameSize-28
- lwz r3,_PowerPCBase(r2)
- lwz r0,-298(r3)
- mtlr r0
- blrl # Run68k
- mr r3,r31
- lwz r31,24(r1)
- addi r1,r1,32
- lwz r0,8(r1)
- lwz r3,20(r3) # return M68k d0 register
- mtlr r0
- blr
- .type _m68k,@function
- .size _m68k,$-_m68k
-
-
- .tocd
- @_ppcargs:
- .long ppcargs
- .bss ppcargs,144 # sizeof(struct PPCArgs)
-